			$(function() {
				//轮播图1
				var index0 = 0;

				$('#top_roll_pic li').css('opacity', '0').eq(0).css('opacity', '1');

				function show() {
					$('#top_roll_pic li').animate({
							opacity: 0
						}, 100).parent().siblings().children()
						.removeClass('bgcolor');
					if(index0 > $('#top_roll_pic li').length - 1) {
						index0 = 0;
					} else if(index0 < 0) {
						index0 = $('#top_roll_pic li').length - 1;
					}
					$('#top_roll_pic li').eq(index0).animate({
							opacity: 1
						}, 300).parent().siblings().children()
						.eq(index0).addClass('bgcolor');
				};

				var timerA = null;

				$('#top_roll_pic').parent().on('mouseenter', function() {
					window.clearInterval(timerA);
				}).on('mouseleave', function() {
					timerA = window.setInterval(function() {
						index0++;
						show()
					}, 3000);
				}).trigger('mouseleave');
				$('#top_roll_btn li').bind('click', function() {
					if($(this).hasClass('bgcolor')) {
						return false;
					}
					index0 = $(this).index();
					show();
				});

				//轮播图2
				var index1 = 0;
				var timerB = null;
				//console.log($('#zero_leftroll_pic li').outerWidth())

				function rollB() {

					var $width = $('#zero_leftroll_pic li').outerWidth();
					if(index1 < 0) {
						index1 = $('#zero_leftroll_pic li').length - 2;
					} else if(index1 > $('#zero_leftroll_pic li').length - 1) {
						index1 = 1;
						$('#zero_leftroll_pic').css('left', 0);
					}
					$('#zero_leftroll_pic').animate({
						left: -$width * index1
					}, 600);
				}

				$('#zero_leftroll').on('mouseenter', function() {
					window.clearInterval(timerB);
				}).on('mouseleave', function() {
					timerB = window.setInterval(function() {
						index1++;
						rollB();
					}, 2000)
				}).trigger('mouseleave');

				$('#zero_leftroll_btn .prev').bind('click', function() {
					index1--;
					rollB();
				});
				$('#zero_leftroll_btn .next').bind('click', function() {
					index1++;
					rollB();
				});

				//轮播图3
				var index2 = 0;
				var timerC = null;
				console.log($('#zero_midroll_pic li').outerWidth())
				rollC()

				function rollC() {
					var $width2 = $('#zero_midroll_pic li').outerWidth();
					if(index2 < 0) {
						index2 = $('#zero_midroll_pic li').length - 2;
					} else if(index2 > $('#zero_midroll_pic li').length - 1) {
						index2 = 1;
						$('#zero_midroll_pic').css('left', 0);
					}
					$('#zero_midroll_pic').animate({
						left: -$width2 * index2
					}, 600);
				}

				$('#zero_midroll').on('mouseenter', function() {
					window.clearInterval(timerC);
				}).on('mouseleave', function() {
					timerC = window.setInterval(function() {
						console.log(index2)
						index2++;
						rollC();
					}, 4000)
				}).trigger('mouseleave');

				$('#zero_midroll_btn .prev').bind('click', function() {
					index2--;
					rollC();
				});
				$('#zero_midroll_btn .next').bind('click', function() {
					index2++;
					rollC();
				});
				
				
				
				
			//设置账户名cookie
				if ($.cookie('setPerson')==null) {
					var data = [];
					var obj = {data:[]};
					var str = JSON.stringify(obj);
					$.cookie('setPerson',str);
				}
			//设置登录状态cookie
				if ($.cookie('landing')==null) {
					$.cookie('landing',0);
				}
			//设置购物车cookie
				if ($.cookie('o')==null) {
					var data = [];
					var obj = {data:[]};
					var str = JSON.stringify(obj);
					$.cookie('o',str);
				}
				
			});